export function getTypeMap () {
  var typeMap = [{
    'name': '文本框',
    'ID': 'input',
  },
    {
      'name': '列表框',
      'ID': 'select',
    },
    {
      'name': '关联列表框',
      'ID': 'connectselect',
    },
    {
      'name': '级联列表框',
      'ID': 'cascader',
    },
    {
      'name': '开关选择',
      'ID': 'switch',
    },
  ]
  return typeMap
}

export function getDataTypeMap () {
  var dataTypeMap = [{
    'name': '整型',
    'ID': 'int',
  },
    {
      'name': '字符串',
      'ID': 'string',
    },
    {
      'name': '日期型',
      'ID': 'date',
    },
    {
      'name': '浮点型',
      'ID': 'float',
    },
  ]
  return dataTypeMap
}

var educationList = [{
  value: 0,
  label: '博士'
}, {
  value: 1,
  label: '硕士'
}, {
  value: 2,
  label: '本科'
}, {
  value: 3,
  label: '大专'
}, {
  value: 4,
  label: '职高/中专/技校'
}, {
  value: 5,
  label: '高中'
}, {
  value: 6,
  label: '初中及以下'
}]

var educationdegreeList = [{
  value: 0,
  label: '无'
}, {
  value: 1,
  label: '学士'
}, {
  value: 2,
  label: '硕士'
}, {
  value: 3,
  label: '博士'
},]
var politicalList = [{
  value: 0,
  label: '党员'
}, {
  value: 1,
  label: '团员'
}, {
  value: 2,
  label: '民主党派'
}, {
  value: 3,
  label: '群众'
}, {
  value: 4,
  label: '无党籍人士'
}]
var marriageList = [{
  value: 0,
  label: '已婚'
}, {
  value: 1,
  label: '未婚'
}, {
  value: 2,
  label: '单身'
}, {
  value: 3,
  label: '保密'
},]
var sexList = [{
  value: 0,
  label: '男'
}, {
  value: 1,
  label: '女'
}, {
  value: 2,
  label: '保密'
}]
//单位性质
var unitCharacterList = [{
  value: 0,
  label: '行政机关'
}, {
  value: 1,
  label: '事业单位'
}, {
  value: 2,
  label: '国有企业'
}, {
  value: 3,
  label: '私营企业'
}, {
  value: 4,
  label: '其他'
}]
//公司类型
var companyTypeList = [{
  value: 0,
  label: '行政机关'
}, {
  value: 1,
  label: '社会团体'
}, {
  value: 2,
  label: '事业单位'
}, {
  value: 3,
  label: '国有企业'
}, {
  value: 4,
  label: '外资企业'
}, {
  value: 5,
  label: '集体企业'
}, {
  value: 6,
  label: '私有企业'
}, {
  value: 7,
  label: '上市公司'
}, {
  value: 8,
  label: '中外合资'
}, {
  value: 9,
  label: '其他'
}]
//公司规模
var companySizeList = [{
  value: 0,
  label: '1-10人'
}, {
  value: 1,
  label: '10-99人'
}, {
  value: 2,
  label: '99-499人'
}, {
  value: 3,
  label: '500—999人'
}, {
  value: 4,
  label: '1000人以'
}]
var jobLevelList = [{
  value: 0,
  label: '副高'
}, {
  value: 1,
  label: '正高'
}]
var familiesList = [{
  value: 0,
  label: '配偶'
}, {
  value: 1,
  label: '子女'
}, {
  value: 2,
  label: '其他亲属'
}, {
  value: 3,
  label: '无家属'
}]
var boolList = [{
  value: 0,
  label: '是'
}, {
  value: 1,
  label: '否'
}]
var isDeliveryList = [{
  value: 0,
  label: '是'
}, {
  value: 1,
  label: '否'
}]
var whetherPublicList = [{
  value: 0,
  label: '是'
}, {
  value: 1,
  label: '否'
}]
var workTypeList = [{
  value: 0,
  label: '全职'
}, {
  value: 1,
  label: '兼职'
}, {
  value: 2,
  label: '实习'
}]
var workStatusList = [{
  value: 0,
  label: '我已离职，可随时上班'
}, {
  value: 1,
  label: '我想跳槽'
}, {
  value: 2,
  label: '可接受高薪'
}, {
  value: 3,
  label: '拒绝任何形式挖墙脚'
}]
var workExperience = [
// {
// 	value:-1,
// 	label:"不要求":
// },
  {
    value: 0,
    label: '有无经验都可'
  }, {
    value: 1,
    label: '一年以下'
  }, {
    value: 2,
    label: '1-3年'
  }, {
    value: 3,
    label: '3-5年'
  }, {
    value: 4,
    label: '5-10年'
  }, {
    value: 5,
    label: '10年以上'
  }]
var recruitmentType = [{
  value: 0,
  label: '网络招聘'
}, {
  value: 1,
  label: '现场招聘'
}]
var job_title = [{
  value: 0,
  label: '销售业务'
}, {
  value: 1,
  label: '销售工程师'
}, {
  value: 2,
  label: 'ERP技术/开发应用'
}, {
  value: 3,
  label: '互联网软件工程师'
}, {
  value: 4,
  label: '企业培训师/讲师'
}, {
  value: 5,
  label: '行政总监'
}, {
  value: 6,
  label: '房地产配套工程师'
}, {
  value: 7,
  label: '物流总监'
}, {
  value: 8,
  label: '美术编辑/美术设计'
}, {
  value: 9,
  label: '工业设计'
}, {
  value: 10,
  label: '化学技术应用'
}, {
  value: 11,
  label: '网络运营管理'
}]
var techTitlesList = [{
  label: '正高',
  value: 0
}, {
  label: '副高',
  value: 1
}, {
  label: '中级',
  value: 2
}, {
  label: '初级',
  value: 3
}, {
  label: '无',
  value: 4
}]
var unitTypeList = [{
  label: '县属企业',
  value: 0
}, {
  label: '部属企业',
  value: 1
}, {
  label: '直属企业',
  value: 2
}]
var bookTypeList = [{
  label: '国家一级出版社出版的专著',
  value: 1
}, {
  label: '国家一级出版社出版的编著',
  value: 2
}, {
  label: '国家二级出版社出版的专著',
  value: 3
}, {
  label: '国家二级出版社出版的编著',
  value: 4
}, {
  label: '国家其他出版社出版的专著',
  value: 5
}, {
  label: '国家其他出版社出版的编著 ',
  value: 6
}]
var journalTypeList = [{
  label: '重要核心期刊',
  value: 1
}, {
  label: '国外期刊',
  value: 2
}, {
  label: '一般核心期刊',
  value: 3
}, {
  label: '国际会议论文集',
  value: 4
}, {
  label: '一般公开期刊',
  value: 5
}, {
  label: '全国性学术会议论',
  value: 6
}, {
  label: '文集',
  value: 7
}, {
  label: '内刊',
  value: 8
}, {
  label: '其他',
  value: '9'
}]
var verifiedList = [{
  label: '未授权',
  value: 0
}, {
  label: '授权',
  value: 1
}]
var patentTypeList = [{
  label: '发明专利',
  value: 1
}, {
  label: '实用新型专利',
  value: 2
}, {
  label: '外观设计专利',
  value: 3
}, {
  label: '计算机软件著作权登记证书',
  value: 4
}, {
  label: '集成电路板样登记',
  value: 5
}, {
  label: '其它',
  value: '6'
}]
var guideTypeList = [{
  label: '个人/荣誉称号',
  value: '0'
},
  {
    label: '团队申报',
    value: '1'
  },
  {
    label: '平台建设',
    value: '2'
  },
  {
    label: '脱贫攻坚',
    value: '3'
  }]
var applicationStepList = [{
  label: '填写',
  value: 0
}, {
  label: '上报',
  value: 1
}, {
  label: '县级初审',
  value: 2
}, {
  label: '部门初审',
  value: 3
}, {
  label: '复审',
  value: 4
}, {
  label: '专家考察',
  value: 5
}, {
  label: '人才小组考察',
  value: 6
}, {
  label: '考核',
  value: 7
}, {
  label: '市常委决议',
  value: 8
}, {
  label: '公示',
  value: 9
}]
var invitationType = [{
  label: '面试通知',
  value: 0
}, {
  label: '邀请函',
  value: 1
}]
var interviewType = [{
  label: '现场面试',
  value: 0
}, {
  label: '视频面试',
  value: 1
}, {
  label: '电话面试',
  value: 2
}]
var viewStatusList = [{
  value: 0,
  label: '未查看'
}, {
  value: 1,
  label: '已查看'
}, {
  value: 2,
  label: '已接受'
}, {
  value: 3,
  label: '已拒绝'
}, {
  value: 4,
  label: '已忽略'
}]
var ApplicationStatusList = [{
  value: '0',
  label: '申请'
}, {
  value: '1',
  label: '处理中'
}, {
  value: '2',
  label: '完成'
}, {
  value: '3',
  label: '取消'
}]
var VerifyTel = [{
  value: 1,
  label: '是'
}, {
  value: 0,
  label: '否'
}]
var VerifyEmail = [{
  value: 1,
  label: '是'
}, {
  value: 0,
  label: '否'
}]
var MemberType = [{
  value: -1,
  label: '不是会员'
}, {
  value: 0,
  label: 'vip'
}, {
  value: 1,
  label: '普通会员'
}]
var StallStatus = [{
  value: 0,
  label: '可用'
}, {
  value: 1,
  label: '不可用'
}]
var PackageType = [{
  value: 0,
  label: '个人用户'
}, {
  value: 1,
  label: '企业用户'
}, {
  value: 2,
  label: '个人和企业'
}]
var PackageMethods = [{
  value: 0,
  label: '次数'
}, {
  value: 1,
  label: '天数'
}, {
  value: 2,
  label: '自定义'
}]
var PackageUserType = [{
  value: 0,
  label: '未使用'
}, {
  value: 1,
  label: '使用中'
}, {
  value: 2,
  label: '已使用'
}]
var billingMethods = [{
  value: 0,
  label: '按次计费'
}, {
  value: 1,
  label: '按天计费'
}]

export function getStaticMapList (type, value) {
  var mapList = []
  switch (type) {
    case 'education':
      mapList = educationList
      break
    case 'political':
      mapList = politicalList
      break
    case 'sex':
      mapList = sexList
      break
    case 'marriage':
      mapList = marriageList
      break
    case 'unit_character':
      mapList = unitCharacterList
      break
    case 'company_type':
      mapList = companyTypeList
      break
    case 'company_size':
      mapList = companySizeList
      break
    case 'job_level':
      mapList = jobLevelList
      break
    case 'families':
      mapList = familiesList
      break
    case 'bool':
      mapList = boolList
      break
    case 'is_delivery':
      mapList = isDeliveryList
      break
    case 'whether_public':
      mapList = whetherPublicList
      break
    case 'work_type':
      mapList = workTypeList
      break
    case 'status':
      mapList = workStatusList
      break
    case 'academic_requirements':
      mapList = educationList
      break
    case 'work_experience':
      mapList = workExperience
      break
    case 'recruitment_type':
      mapList = recruitmentType
      break
    case 'education_degree':
      mapList = educationdegreeList
      break
    case 'tech_titles':
      mapList = techTitlesList
      break
    case 'unit_type':
      mapList = unitTypeList
      break
    case 'book_type':
      mapList = bookTypeList
      break
    case 'journal_type':
      mapList = journalTypeList
      break
    case 'verified':
      mapList = verifiedList
      break
    case 'patent_type':
      mapList = patentTypeList
      break
    case 'guide_type':
      mapList = guideTypeList
      break
    case 'step':
      mapList = applicationStepList
      break
    case 'invitation_type':
      mapList = invitationType
      break
    case 'interview_type':
      mapList = interviewType
      break
    case 'view_status':
      mapList = viewStatusList
      break
    case 'state':
      mapList = ApplicationStatusList
      break
    case 'verify_tel':
      mapList = VerifyTel
      break
    case 'verify_email':
      mapList = VerifyEmail
      break
    case 'member_type':
      mapList = MemberType
      break
    case 'stall_status':
      mapList = StallStatus
      break
    case 'user_group':
      mapList = PackageType
      break
    case 'billing_method_type':
      mapList = PackageMethods
      break
    case 'use_state':
      mapList = PackageUserType
      break
    case'billing_method_type':
      mapList = billingMethods
      break
    default:
      return value
  }

  if (value === undefined) {
    return mapList
  }
  var i = 0
  var len = mapList.length
  for (i = 0; i < len; i++) {
    if (mapList[i].value === value) {
      return mapList[i].label
    }
  }
}
